import toml from 'toml-j0.4';
import tomlify from 'tomlify-j0.4';

export default class Toml {

  static Encoder = class Encoder {
    static Name = "<%= UIText.Build %> TOML";

    compute(data) {
      return tomlify(data, null, 2);
    }
  }

  static Decoder = class Decoder {
    static Name = "<%= UIText.Parse %> TOML";

    compute(text) {
      return toml.parse(text);
    }
  }
}
